package com.shan;

/**
 * @Author: ShanYuqing
 * @Version: v1.0
 */
public class CheckArray {
    public static void main(String[] args) {
        int[] arr1 = {11, 22, 33};
        int[] arr2 = {11, 22, 33};
        boolean flag = check(arr1, arr2);
        System.out.println(flag);
    }

    /*
            需求：定义一个方法，比较两个数组的内容是否相同
            要求：长度，内容，顺序完全相同
     */
    public static boolean check(int[] arr1, int[] arr2) {
        if (arr1.length != arr2.length) {
            return false;
        }
        for (int i = 0; i < arr1.length; i++) {
            if (arr1[i] != arr2[i]) {
                return false;
            }
        }
        return true;
    }
}
